/*
 * XML Type:  Codes
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.Codes
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML Codes(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class CodesImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.Codes
{
    
    public CodesImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CODE$0 = 
        new javax.xml.namespace.QName("", "CODE");
    private static final javax.xml.namespace.QName CODEAMOUNT$2 = 
        new javax.xml.namespace.QName("", "CODEAMOUNT");
    
    
    /**
     * Gets the "CODE" element
     */
    public java.lang.String getCODE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CODE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "CODE" element
     */
    public net.ofx.types.x2003.x04.Codes.CODE xgetCODE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Codes.CODE target = null;
            target = (net.ofx.types.x2003.x04.Codes.CODE)get_store().find_element_user(CODE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "CODE" element
     */
    public void setCODE(java.lang.String code)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CODE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CODE$0);
            }
            target.setStringValue(code);
        }
    }
    
    /**
     * Sets (as xml) the "CODE" element
     */
    public void xsetCODE(net.ofx.types.x2003.x04.Codes.CODE code)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.Codes.CODE target = null;
            target = (net.ofx.types.x2003.x04.Codes.CODE)get_store().find_element_user(CODE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.Codes.CODE)get_store().add_element_user(CODE$0);
            }
            target.set(code);
        }
    }
    
    /**
     * Gets the "CODEAMOUNT" element
     */
    public java.lang.String getCODEAMOUNT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CODEAMOUNT$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "CODEAMOUNT" element
     */
    public net.ofx.types.x2003.x04.AmountType xgetCODEAMOUNT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(CODEAMOUNT$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "CODEAMOUNT" element
     */
    public void setCODEAMOUNT(java.lang.String codeamount)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CODEAMOUNT$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CODEAMOUNT$2);
            }
            target.setStringValue(codeamount);
        }
    }
    
    /**
     * Sets (as xml) the "CODEAMOUNT" element
     */
    public void xsetCODEAMOUNT(net.ofx.types.x2003.x04.AmountType codeamount)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(CODEAMOUNT$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AmountType)get_store().add_element_user(CODEAMOUNT$2);
            }
            target.set(codeamount);
        }
    }
    /**
     * An XML CODE(@).
     *
     * This is an atomic type that is a restriction of org.apache.xmlbeans.XmlString.
     */
    public static class CODEImpl extends org.apache.xmlbeans.impl.values.JavaStringHolderEx implements net.ofx.types.x2003.x04.Codes.CODE
    {
        
        public CODEImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType, false);
        }
        
        protected CODEImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
        {
            super(sType, b);
        }
    }
}
